function myNew(Fn) {
	let obj = new Object();
	obj.__proto__ = Fn.prototype;
	// let obj = Object.create(Fn.prototype);
	
	
	let arg = [].splice.call(arguments,1);
	Fn.call(obj,...arg);
	return obj;
}

function Fun(a) {
	this.a = a;
	this.say = function () {
		console.log(this.a);
	}
}
Fun.prototype.test = function () {
	console.log('test'+this.a);
}

let fun = new Fun('嘿嘿');
let fun1 = myNew(Fun,'拉拉');

fun.say();
fun1.say();
fun.test();
fun1.test();
// console.log(fun.a);
// console.log(fun1.a);
console.log(fun1.__proto__ === Fun.prototype)